<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

欢迎您：<span th:if="${#session.getAttribute('loginUser') != null}" th:text="${#session.getAttribute('loginUser').usrName}">管理员</span>

</body>
</html>